package com.woonoz.network;

import java.net.ProxySelector;

import com.woonoz.network.windows.WindowsProxySelector;

public class ProxySelectorFactory {

	private final boolean windows;
	
	public ProxySelectorFactory() {
		super();
		windows = System.getProperty("os.name").toLowerCase().startsWith("windows");
	}
	
	public ProxySelector newProxySelector() {
		if (windows) {
			return new WindowsProxySelector();			
		} else {
			return ProxySelector.getDefault();
		}
	}
}
